Skip to content

chore: UI improvements in expanded card#29918

Merged
zone-live merged 8 commits into
mainfrom
TSA-500-ui-updates-whats-happening
May 8, 2026
Merged

chore: UI improvements in expanded card#29918
zone-live merged 8 commits into
mainfrom
TSA-500-ui-updates-whats-happening

Conversation

@zone-live
Copy link
Copy Markdown
Contributor

@zone-live zone-live commented May 8, 2026

Description

The expanded “What’s happening” cards now treat every related asset as a perps market: a single Markets section with Trade only, live prices from the perps stream, verified badge when caip19 + flags allow, and TokenRow removed.

Simulator Screenshot - iPhone 17 Pro - 2026-05-08 at 14 53 15

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
    • Ideally on a mid-range device; emulator is acceptable
  • I've tested with a power user scenario
    • Use these power-user SRPs to import wallets with many accounts and tokens
  • I've instrumented key operations with Sentry traces for production performance metrics

For performance guidelines and tooling, see the Performance Guide.

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Medium Risk
Medium risk because it changes expanded card behavior and starts a perps WebSocket price subscription in WhatsHappeningDetailView, which can affect performance/render frequency and trade CTA visibility.

Overview
Updates the expanded “What’s happening” detail cards to treat all relatedAssets as perps markets. The card now shows a single Related Assets section with Trade-only rows (no Buy flow) and hides the CTA when an asset has no hlPerpsMarket.

Adds live perps price + 24h % change display per asset via a new useWhatsHappeningAssetPrices hook (deduped symbols, 3s throttling) and wraps the detail view in PerpsStreamProvider to enable the stream. UI polish includes an AI pill next to the impact badge, a bottom fade gradient hint for scrollable content, and a pill-shaped active dot in PageIndicator.

Cleans up by removing TokenRow and adding unit tests for the new/updated components and formatting utilities, plus new i18n strings (related_assets, whats_happening_ai).

Reviewed by Cursor Bugbot for commit 36e1821. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@metamaskbotv2 metamaskbotv2 Bot added the team-social-ai Social & AI team label May 8, 2026
Comment thread app/components/Views/WhatsHappeningDetailView/components/AssetRow.test.tsx Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 09fdbcb. Configure here.

@zone-live zone-live removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label May 8, 2026
Comment thread app/components/Views/WhatsHappeningDetailView/components/AssetRow.tsx Outdated
Comment thread app/components/Views/WhatsHappeningDetailView/components/PerpsRow.tsx Outdated
Comment thread app/components/Views/WhatsHappeningDetailView/utils/formatAssetPrice.ts Outdated
joaosantos15
joaosantos15 previously approved these changes May 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokePerps, SmokeConfirmations
  • Selected Performance tags: @PerformancePreps
  • Risk Level: medium
  • AI Confidence: 78%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes introduce/update the WhatsHappeningDetailView, which is a detail screen for the "What's Happening" feature embedded in the Trending tab. Key findings:

  1. SmokeWalletPlatform: The WhatsHappening feature is part of the Trending tab (Homepage), which is directly tested by SmokeWalletPlatform. The tag description explicitly mentions "Trending discovery tab" and "browsing content feeds (Predictions, Tokens, Perps, Sites sections)". The WhatsHappeningDetailView is navigated to from the Trending/WhatsHappening section.

  2. SmokePerps: The PerpsRow component integrates live perps prices via useWhatsHappeningAssetPrices (which uses usePerpsLivePrices WebSocket stream) and includes a "Trade" button that navigates to perps trading. The PerpsStreamProvider wraps the entire detail view. Per the SmokePerps tag description: "changes to Perps views (headers, lists, full views, e.g. PerpsHomeView, PerpsMarketListView, PerpsWithdrawView) affect Trending." The PerpsRow is a new perps view component. When selecting SmokePerps, also select SmokeWalletPlatform (already included) and SmokeConfirmations.

  3. SmokeConfirmations: Required as a dependent tag when SmokePerps is selected (Add Funds deposits are on-chain transactions).

The locales change adds two new strings (related_assets, whats_happening_ai) used in the WhatsHappeningExpandedCard, which is a UI-only change.

No E2E tests currently exist specifically for WhatsHappening, so these tags cover the closest related functionality. The changes are medium risk - they're new UI components with perps integration but don't touch core infrastructure.

Performance Test Selection:
The WhatsHappeningDetailView integrates live perps price data via WebSocket stream (usePerpsLivePrices with 3s throttle) and renders a carousel of expanded cards with real-time price updates. The PerpsRow component displays live price/change data for perps assets. These changes could impact perps-related rendering performance, making @PerformancePreps relevant to validate that the live price integration doesn't degrade perps market loading and display performance.

View GitHub Actions results

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@zone-live zone-live added this pull request to the merge queue May 8, 2026
Merged via the queue into main with commit b2b891c May 8, 2026
113 of 114 checks passed
@zone-live zone-live deleted the TSA-500-ui-updates-whats-happening branch May 8, 2026 17:18
@github-actions github-actions Bot locked and limited conversation to collaborators May 8, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.78.0 Issue or pull request that will be included in release 7.78.0 label May 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.78.0 Issue or pull request that will be included in release 7.78.0 size-XL team-social-ai Social & AI team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants